﻿using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace STF.Blog.Model
{
    /// <summary>
    /// 回复表
    /// </summary>
    public class Reply:BaseEntity
    {
        //[ForeignKey(nameof(Comment))]
        public int Pid { get; set; }    // 评论表外键

        [Required(ErrorMessage = "{0}不能为空")]
        [StringLength(2000), Column(TypeName = "varchar(2000)")]
        [Display(Name = "回复内容")]
        public string Content { get; set; }

        [Required(ErrorMessage = "{0}不能为空")]
        [Display(Name = "回复父级Id")]
        public int ParentId { get; set; }

        [Display(Name = "点赞数")]
        public int LikeSum { get; set; }

        //[ForeignKey(nameof(Users))]
        public int Uid { get; set; }    // 账户表外键

        //public Comment Comment { get; set; }

        //public Users Users { get; set; }
    }
}
